import java.util.InputMismatchException;
import java.util.Scanner;
public class Formula {
    public static void main(String[] args) {
        //一元二次方程的两个解
        double x1=0;
        double x2=0;
        int a,b,c;
        System.out.println("请依次输入一元二次方程a,b,c的值");
        Scanner sc=new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
        c=sc.nextInt();
        double delta=b*b-4*a*c;

        try{
            x1=(-b+Math.sqrt(delta))/(2*a);
            x2=(-b-Math.sqrt(delta))/(2*a);
            if(delta<0)
                throw new InputMismatchException();
        }catch(InputMismatchException e1){
            System.out.println("此方程无解");
        }


    }
}
